﻿namespace BodaNetCommunications.ModbusTcpComs
{
    public enum ModbusFunctionCode
    {
        /// <summary>
        /// 未知功能
        /// </summary>
        UnknowFunction = 0x00,

        /// <summary>
        /// 读取线圈
        /// </summary>
        ReadCoil = 0x01,

        /// <summary>
        /// 读取离散量
        /// </summary>
        ReadDiscrete = 0x02,

        /// <summary>
        /// 读取寄存器
        /// </summary>
        ReadRegister = 0x03,

        /// <summary>
        /// 读取输入寄存器
        /// </summary>
        ReadInputRegister = 0x04,

        /// <summary>
        /// 写单个线圈
        /// </summary>
        WriteOneCoil = 0x05,

        /// <summary>
        /// 写单个寄存器
        /// </summary>
        WriteOneRegister = 0x06,

        /// <summary>
        /// 写多个线圈
        /// </summary>
        WriteCoil = 0x0F,

        /// <summary>
        /// 写多个寄存器
        /// </summary>
        WriteRegister = 0x10
    }
}